import fs from 'fs';
import KoaRouter from 'koa-router'
const router = new KoaRouter();

let files = fs.readdirSync(__dirname)
files.map(file => {
    if (file != 'index.ts') {
        let r = require('./' + file);
        router.use(r.default.routes())
    }
});

export default router